#!/bin/bash

if [ ! -e /nginx/conf/nginx.conf ]; then
  cp /usr/local/nginx/conf/nginx.conf /nginx/conf
  sed -i "s/mime.types/\/usr\/local\/nginx\/conf\/mime.types/" /nginx/conf/nginx.conf
fi

/usr/local/nginx/sbin/nginx -c /nginx/conf/nginx.conf -g 'daemon off;'